package com.ruoyi.statistic.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statistic.mapper.WDayEnterWarehouseStatMapper;
import com.ruoyi.statistic.domain.WDayEnterWarehouseStat;
import com.ruoyi.statistic.service.IWDayEnterWarehouseStatService;

/**
 * 日入库量Service业务层处理
 * 
 * @author wzy
 * @date 2024-09-01 17:36:31
 */
@Service
public class WDayEnterWarehouseStatServiceImpl implements IWDayEnterWarehouseStatService 
{
    @Autowired
    private WDayEnterWarehouseStatMapper wDayEnterWarehouseStatMapper;

    /**
     * 查询日入库量
     * 
     * @param dayEnterStatisticId 日入库量主键
     * @return 日入库量
     */
    @Override
    public WDayEnterWarehouseStat selectWDayEnterWarehouseStatByDayEnterStatisticId(Long dayEnterStatisticId)
    {
        return wDayEnterWarehouseStatMapper.selectWDayEnterWarehouseStatByDayEnterStatisticId(dayEnterStatisticId);
    }

    /**
     * 查询日入库量列表
     * 
     * @param wDayEnterWarehouseStat 日入库量
     * @return 日入库量
     */
    @Override
    public List<WDayEnterWarehouseStat> selectWDayEnterWarehouseStatList(WDayEnterWarehouseStat wDayEnterWarehouseStat)
    {
        return wDayEnterWarehouseStatMapper.selectWDayEnterWarehouseStatList(wDayEnterWarehouseStat);
    }

    /**
     * 新增日入库量
     * 
     * @param wDayEnterWarehouseStat 日入库量
     * @return 结果
     */
    @Override
    public int insertWDayEnterWarehouseStat(WDayEnterWarehouseStat wDayEnterWarehouseStat)
    {
        wDayEnterWarehouseStat.setCreateTime(DateUtils.getNowDate());
        return wDayEnterWarehouseStatMapper.insertWDayEnterWarehouseStat(wDayEnterWarehouseStat);
    }

    /**
     * 修改日入库量
     * 
     * @param wDayEnterWarehouseStat 日入库量
     * @return 结果
     */
    @Override
    public int updateWDayEnterWarehouseStat(WDayEnterWarehouseStat wDayEnterWarehouseStat)
    {
        wDayEnterWarehouseStat.setUpdateTime(DateUtils.getNowDate());
        return wDayEnterWarehouseStatMapper.updateWDayEnterWarehouseStat(wDayEnterWarehouseStat);
    }

    /**
     * 批量删除日入库量
     * 
     * @param dayEnterStatisticIds 需要删除的日入库量主键
     * @return 结果
     */
    @Override
    public int deleteWDayEnterWarehouseStatByDayEnterStatisticIds(Long[] dayEnterStatisticIds)
    {
        return wDayEnterWarehouseStatMapper.deleteWDayEnterWarehouseStatByDayEnterStatisticIds(dayEnterStatisticIds);
    }

    /**
     * 删除日入库量信息
     * 
     * @param dayEnterStatisticId 日入库量主键
     * @return 结果
     */
    @Override
    public int deleteWDayEnterWarehouseStatByDayEnterStatisticId(Long dayEnterStatisticId)
    {
        return wDayEnterWarehouseStatMapper.deleteWDayEnterWarehouseStatByDayEnterStatisticId(dayEnterStatisticId);
    }
}
